package com.lhj.jpa.future;

import java.util.StringJoiner;

/**
 * @author linghaijin781
 * @date 2021/9/2110:43 下午
 */
public class SmallTool {

	public static void sleepMills(long mills) {
		try {
			Thread.sleep(mills);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

	public static void printTimeAndThread(String tag) {
		String result = new StringJoiner("\t|\t")
				.add(String.valueOf(System.currentTimeMillis()))
				.add(String.valueOf(Thread.currentThread().getId()))
				.add(Thread.currentThread().getName())
				.add(tag)
				.toString();
		System.out.println(result);
	}

}
